home *** CD-ROM | disk | FTP | other *** search
- TITLE ANSINORM.ASM - SET FOREGROUND/BACKGROUND TO NORMAL FOR ANSI.SYS
- page 60,132
-
- ; written by Terry Barr - CIS 70406,377 or Gene Plantz's IBBS.
- ; August 26, 1985
-
- comment * ESC [2J - Erases all of screen and the cursor
- goes to the home position.
-
- parameters for SGR (set graphics rendition)
-
- page 3-15 in IBM DOS Technical Reference Manual
-
- ESC [#;...;#m - sets the character attribute specified
- by the parameters. All following characters have the
- attribute according to the parameters until the next
- occurence of SGR.
-
- Parameter Meaning
- ---------->>> 0 All attributes off (normal white on black)
- 1 Bold on (high intensity)
- 4 Underscore on (IBM Mono Display only)
- 5 Blink on
- 7 Reverse video on
- 8 Canceled on (invisible)
- 30 Black foreground
- 31 Red foreground
- 32 Green foreground
- 33 Yellow foreground
- 34 Blue foreground
- 35 Magenta foreground
- 36 Cyan foreground
- 37 White foreground
- 40 Black background
- 41 Red background
- 42 Green background
- 43 Yellow background
- 44 Blue background
- 45 Magenta background
- 46 Cyan background
- 47 White background
- *
- CSEG SEGMENT PARA PUBLIC 'CODE'
- ASSUME CS:CSEG,DS:CSEG
-
- ORG 100H
- ENTPT: JMP SHORT START
- COLOR DB 27,'[0m',27,'[2J' ; return to norm attr. & clear screen
- COLSIZ EQU $-COLOR ; length of above message
- HANDLE EQU 1 ; handle for standard output
- SF9 DB 27,'[0;92;"ANSINORM";13p' ;<<------------------------------
- SF9SIZ EQU $-SF9 ;<< you can remove these lines
- SF10 DB 27,'[0;93;"ANSICOLR";13p' ;<< if you don't want to be able
- SF10SIZ EQU $-SF10 ;<< to run programs from
- ; SHIFT F9 & F10.
- ;-------------------------------
- START PROC NEAR
- MOV BX,HANDLE ; standard output device
- MOV CX,COLSIZ ; get size of text to be sent
- MOV DX,OFFSET COLOR ; pass offset of string to be sent
- MOV AH,40H ; function= 'write to device'
- INT 21H ; call dos
-
- ; ********* you can remove all lines between the stars to get rid **********
- ; ********* of the automatic running of these programs. ********************
-
- MOV BX,HANDLE ; standard output device
- MOV CX,SF9SIZ ; get size of text to be sent
- MOV DX,OFFSET SF9 ; pass offset of string to be sent
- MOV AH,40H ; function= 'write to device'
- INT 21H ; call dos
- MOV BX,HANDLE ; standard output device
- MOV CX,SF10SIZ ; get size of text to be sent
- MOV DX,OFFSET SF10 ; pass offset of string to be sent
- MOV AH,40H ; function= 'write to device'
- INT 21H ; call dos
- ; *************************************************************************
- RET
- START ENDP
-
- CSEG ENDS
- END ENTPT